package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * @desc CycleDto
 * @使用场景
 */
@Data
public class CycleDto extends BaseDto implements Serializable {

  /**
   * 周期ID:
   */
  @ApiModelProperty("周期ID")
  private String cycleId;

  /**
   * 周期名称:
   */
  @ApiModelProperty("周期名称")
  private String cycleStandardName;

  /**
   * 周期开始时间:
   */
  @ApiModelProperty("周期开始时间")
  private Date cycleStartTime;

  /**
   * 周期结束时间:
   */
  @ApiModelProperty("周期结束时间")
  private Date cycleEndTime;

  /**
   * 周期类型标识:
   */
  @ApiModelProperty("周期类型标识")
  private String cycleTypeCode;

  /**
   * 周期类型实例标识:
   */
  @ApiModelProperty("周期类型实例标识")
  private String cycleTypeInstanceCode;

  /**
   * 周期体系类型标识:
   */
  @ApiModelProperty("周期体系类型标识")
  private String cycleSystemCode;

  /**
   * 冗余周期类型标准化:
   */
  @ApiModelProperty("冗余周期类型标准化")
  private String cycleTypeStandard;

  /**
   * 是否是平台:
   */
  @ApiModelProperty("是否是平台")
  private String platformData;

  /**
   * 主体生命周期:
   */
  @ApiModelProperty("主体生命周期")
  private String subjectLifeCycle;

  /**
   * 操作人就职记录ID:
   */
  @ApiModelProperty("操作人就职记录ID")
  private String operationInductionId;

  /**
   * 操作时间:
   */
  @ApiModelProperty("操作时间")
  private Date operateTime;

  /**
   * 是否存档
   */
  @ApiModelProperty("是否存档")
  private String isArchive;

  /**
   * 排序
   */
  @NotNull(message = "排序不能为空")
  @ApiModelProperty("排序")
  private Long orderNumber;

  /**
   * 周期类型名称
   */
  @ApiModelProperty("周期类型名称")
  private String cycleTypeName;

  /**
   * 周期类型实例简称
   */
  @ApiModelProperty("周期类型实例简称")
  private String cycleNumberShortName;

  /**
   * 是否末级周期 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否末级周期")
  private String isLastCycle;

  /**
   * 周期类型配置标识
   */
  @ApiModelProperty("周期类型配置标识")
  private String cycleTypeConfCode;

  /**
   * 最近可循环周期类型编码
   */
  @ApiModelProperty("最近可循环周期类型编码")
  private String nextCyclePeriod;

  /**
   * 是否当前周期 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否当前周期")
  private String isCurrentCycle;

  /**
   * 是否下一周期 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否下一周期")
  private String isNextCycle;

  /**
   * 个人账号ID
   */
  @ApiModelProperty("个人账号ID")
  private String userId;

  /**
   * 真实头像
   */
  @ApiModelProperty("真实头像")
  private String userFace;

  /**
   * 真实姓名
   */
  @ApiModelProperty("真实姓名")
  private String idCardName;

  /**
   * 用户昵称
   */
  @ApiModelProperty("用户昵称")
  private String nickName;

  /**
   * 被评对象目标周期ID
   */
  @ApiModelProperty("被评对象目标周期ID")
  private String evaObjTargetCycleId;

  /**
   * 是否父周期 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否父周期")
  private String isFatherCycle;

  /**
   * 是否子周期 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否子周期")
  private String isSubCycle;

  /**
   * 是否中期 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否中期")
  private String isMetaphase;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    CycleDto that = (CycleDto) o;
    return (
      Objects.equals(cycleId, that.cycleId) &&
      Objects.equals(cycleStandardName, that.cycleStandardName) &&
      cycleStartTime == that.cycleStartTime &&
      cycleEndTime == that.cycleEndTime &&
      Objects.equals(cycleTypeCode, that.cycleTypeCode) &&
      Objects.equals(cycleTypeInstanceCode, that.cycleTypeInstanceCode) &&
      Objects.equals(cycleSystemCode, that.cycleSystemCode) &&
      Objects.equals(cycleTypeStandard, that.cycleTypeStandard) &&
      Objects.equals(platformData, that.platformData) &&
      Objects.equals(subjectLifeCycle, that.subjectLifeCycle) &&
      Objects.equals(operationInductionId, that.operationInductionId) &&
      operateTime == that.operateTime &&
      Objects.equals(isArchive, that.isArchive) &&
      Objects.equals(orderNumber, that.orderNumber) &&
      Objects.equals(cycleTypeName, that.cycleTypeName) &&
      Objects.equals(cycleNumberShortName, that.cycleNumberShortName) &&
      Objects.equals(isLastCycle, that.isLastCycle) &&
      Objects.equals(cycleTypeConfCode, that.cycleTypeConfCode) &&
      Objects.equals(nextCyclePeriod, that.nextCyclePeriod) &&
      Objects.equals(isCurrentCycle, that.isCurrentCycle) &&
      Objects.equals(isNextCycle, that.isNextCycle) &&
      Objects.equals(userId, that.userId) &&
      Objects.equals(userFace, that.userFace) &&
      Objects.equals(idCardName, that.idCardName) &&
      Objects.equals(nickName, that.nickName) &&
      Objects.equals(evaObjTargetCycleId, that.evaObjTargetCycleId) &&
      Objects.equals(isFatherCycle, that.isFatherCycle) &&
      Objects.equals(isSubCycle, that.isSubCycle) &&
      Objects.equals(isMetaphase, that.isMetaphase)
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      cycleId,
      cycleStandardName,
      cycleStartTime,
      cycleEndTime,
      cycleTypeCode,
      cycleTypeInstanceCode,
      cycleSystemCode,
      cycleTypeStandard,
      platformData,
      subjectLifeCycle,
      operationInductionId,
      operateTime,
      isArchive,
      orderNumber,
      cycleTypeName,
      cycleNumberShortName,
      isLastCycle,
      cycleTypeConfCode,
      nextCyclePeriod,
      isCurrentCycle,
      isNextCycle,
      userId,
      userFace,
      idCardName,
      nickName,
      evaObjTargetCycleId,
      isFatherCycle,
      isSubCycle,
      isMetaphase
    );
  }

}
